<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>pc端的缩放</title>
    <style>
        img {
            width: 200px;
            height: 150px;
        }
    </style>
</head>

<body>
    <div>
        <img src="./imgs/1.jpg" alt="">
        <img src="./imgs/2.jpg" alt="">
        <img src="./imgs/3.jpg" alt="">
        <img src="./imgs/4.jpg" alt="">

    </div>

    <script>
        console.log('PC端的视口为：', document.documentElement.clientWidth);
        window.onresize = function () {
            console.log('PC端的视口为：', document.documentElement.clientWidth);
        }

    </script>
</body>

</html>